
quietly {
if e(N)<15 {
  local n_round=round(e(N),1)	
	}
if e(N)>=15 		& e(N)<100 {
  local n_round=round(e(N),10) 	
	}
if e(N)>=100 		& e(N)<1000 {
   local n_round=round(e(N),50) 	
  }
if e(N)>=1000 		& e(N)<10000 {
  local n_round=round(e(N),100)
  }
if e(N)>=10000 		& e(N)<100000 {
   local n_round=round(e(N),500) 
  }
if e(N)>=100000 	& e(N)<1000000 {
   local n_round=round(e(N),1000)
  }
if e(N)>=1000000 	& e(N)<10000000 {
   local n_round=round(e(N),10000) 	
  }
if e(N)>=10000000 	& e(N)<100000000 {
   local n_round=round(e(N),100000)
  }
if e(N)>=100000000 	& e(N)<1000000000 {
   local n_round=round(e(N),1000000) 	
  }
if e(N)>=1000000000 	& e(N)<10000000000 {
   local n_round=round(e(N),10000000) 	
  }
if e(N)>=10000000000 	& e(N)<100000000000 {
   local n_round=round(e(N),100000000) 	
  }
if e(N)>=100000000000 	& e(N)<1000000000000 {
   local n_round=round(e(N),1000000000) 	
  }
}

di "`n_round'"
estadd scalar N_round=`n_round'